package com.tgy.myplus.controller;

import com.tgy.myplus.service.impl.UserServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    UserServiceImpl userService;
    @PostMapping("/password")
    public String login(@RequestBody Map<String, String> map){
        return userService.getPassword(map.get("name"));
    }

    @PostMapping("/aaa")
    public String aaa(@RequestBody @RequestParam String name){
        return userService.getPassword(name);
    }
}
